package PTA_8;

import java.util.ArrayList;
import java.util.Scanner;

public class t2 {
    public static void main(String[] args) {
        ArrayList<Integer> list=new ArrayList<Integer>();
        Scanner scan=new Scanner(System.in);
        int n=scan.nextInt();

        /* 请在这里填写答案 */
        int max=0,min=0;
        for (int i = 0; i < n; i++) {
            list.add(scan.nextInt());
            if(list.get(i) > max)
                max = list.get(i);
            if(list.get(i) < min)
                min = list.get(i);
        }
        System.out.println("数列是："+list.toString());
        System.out.println("数列中最大的数是:"+max) ;
        System.out.println("数列中最小的数是:"+min) ;
    }
}
